package com.taobao.txc.common.b.a;

import java.sql.SQLException;

public class b
  implements a
{
  public boolean a(SQLException paramSQLException)
  {
    String str1 = paramSQLException.getSQLState();
    int i = paramSQLException.getErrorCode();
    if ((str1 != null) && (str1.startsWith("08"))) {
      return true;
    }
    switch (i)
    {
    case 1004: 
    case 1005: 
    case 1015: 
    case 1021: 
    case 1037: 
    case 1038: 
    case 1040: 
    case 1041: 
    case 1042: 
    case 1043: 
    case 1045: 
    case 1047: 
    case 1081: 
    case 1129: 
    case 1130: 
      return true;
    }
    if ((i >= -10000) && (i <= -9000)) {
      return true;
    }
    String str2 = paramSQLException.getClass().getName();
    if ("com.mysql.jdbc.CommunicationsException".equals(str2)) {
      return true;
    }
    String str3 = paramSQLException.getMessage();
    if ((str3 != null) && (str3.length() > 0))
    {
      String str4 = str3.toUpperCase();
      if (((i == 0) && (str4.contains("COMMUNICATIONS LINK FAILURE"))) || (str4.contains("COULD NOT CREATE CONNECTION")) || (str4.contains("NO DATASOURCE")) || (str4.contains("NO ALIVE DATASOURCE"))) {
        return true;
      }
    }
    return false;
  }
}


/* Location:           C:\Users\ibm\Downloads\txc-yun-sample (1)\txc-yun-sample\lib\txc-client-2.0.72.jar
 * Qualified Name:     com.taobao.txc.common.b.a.b
 * JD-Core Version:    0.7.0.1
 */